using UnityEngine;
using UnityEngine.EventSystems;

namespace Framework
{
    public class UIWidget
    {
        public bool Enabled { get; protected set; }
        public UGUIWidget Widget { get; private set; }
        public virtual void Bind(UGUIWidget value)
        {
            if (Widget != null)
            {
                return;
            }
            this.Widget = value;
            if (value is UGUIWindow)
            {
                return;
            }
            OnAwake();
            Enabled = true;
        }
        protected virtual void OnAwake()
        {

        }
        public virtual void OnDestroy()
        {

        }
        public virtual void SetParam(string name, object value)
        {

        }
        public virtual void OnPointerDown(PointerEventData eventData)
        {

        }
        public virtual void OnPointerUp(PointerEventData eventData)
        {

        }

    }
}